<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<HEAD>
     <TITLE>@Import - Cascading Style Sheet Syntax</TITLE>
     <link rel="stylesheet" type="text/css" href="../../../ss/2.css" id="thecss">
     <script type="text/javascript" src="../../../scripts/csschange.js"></script>
</HEAD>

<BODY onload="readSS()">

<br>
<center>
<table border=3 cellpadding=5 cellspacing=0>
<tr>
     <td rowspan=2><h1 class="pagetitle">@import</h1>
     <b><a href="../../../misc/suppkey.htm">Support Key:</a></b>
     [<b><i class="fs">CSS1</i></b>|<b class="s">CSS2</b>|<b class="s">CSS2.1</b>] 
     [<b><i class="fs">IE4</i></b>|<b class="s">N6</b>|<b class="s">O3.5</b>|<b class="s">S1</b>]<br></td>
     <td align=center><b class="alert">Other<br>At-Rules</b><br></td>
</tr>
<tr>
    <td><a href="charset.htm">@charset</a><br>
    <a href="media.htm">@media</a><br>
    <a href="namespace.htm">@namespace</a><br>
    <a href="page.htm">@page</a><br>
    <a href="fontdef.htm">@fontdef</a><br>
    <a href="fontface.htm">@font-face</a><br></td>
</tr>
<tr><td align=center colspan=2>
<font size=2>= <span class="sitetitle">Index DOT Css</span> by <a 
href="../../../misc/email.htm">Brian Wilson</a> =</font><br>
</td></tr>
</table>
</center>

<div align="center">
<font size=2><a href="../../index.html">Main Index</a> |
   <a href="../../propindex/font.htm">Property Index</a> |
   <a href="../../supportkey/syntax.htm">CSS Support History</a> |
   <a href="../../../history/browsers.htm">Browser History</a></font>
</div>
<hr size=1 align="center" width="25%">

<br><br>
<dl>
<dt><big><b class="mainheading">What is it?</b></big>
    <dd>This At-Rule syntax imports a style sheet fragment file to the
        current style sheet. It may be used in External and Embedded style
        sheets, but not with inline styles. Furthermore, multiple fragments can
        be imported in to a single style sheet, but all @import statements must
        occur before any style declaration Rule-Sets in the style sheet.
        <br><br>

        An optional, case-insensitive argument can be specified after the URL of
        the fragment indicating one or more target media where the fragment should
        be applied (the default if no media is specified is "all".) Specifying
        media dependent styles via @import can be more efficient than
        <a href="media.htm">@media</a> At-Rules, because unneeded style fragments
        do not need to be downloaded or parsed in the @import case.
</dl>


<dl>
<dt><big><b class="mainheading">Media Types Specified in CSS2</b></big>
    <dd><table border=1 cellspacing=0 cellpadding=5>
        <tr><td>All</td><td>Aural</td></tr>
        <tr><td>Braille</td><td>Embossed</td></tr>
        <tr><td>Handheld</td><td>Print</td></tr>
        <tr><td>Projection</td><td>Screen</td></tr>
        <tr><td>Tty</td><td>Tv</td></tr>
        </table>
</dl>

<dl>
<dt><big><b class="mainheading">Syntax</b></big>
    <dd>Syntax1: @<b class="selector">import</b>
        "[<span class="alert2">URL</span>]" ([<span class="alert2">media</span>]
        ("," [<span class="alert2">media</span>])+ )? ";"
    <dd>Syntax2: @<b class="selector">import</b>
        url("[<span class="alert2">URL</span>]") ([<span class="alert2">media</span>]
        ("," [<span class="alert2">media</span>])+ )? ";"
</dl>

<dl>
<dt><big><b class="mainheading">Examples</b></big>
    <dd><div class="example">@<b class="selector">import</b>
        <span class="atrule">url</span>("foo.css")
        <span class="alert2">screen</span>, <span class="alert2">print</span>;</div>
</dl>

<big><b class="mainheading">Browser Peculiarities</b></big>
<ul>
    <li><b class="alert">Internet Explorer</b>
        <dl>
        <dd><b class="alert2">4.0:</b>
        <dd>- The '@import "[URL]"' syntax is not understood in this version.
            The '@import url("[URL]")' syntax works as expected.
        <dd><b class="alert2">4.0+:</b>
        <dd>- The media type can not be specified for @import yet. In fact,
            if it <em>IS</em> specified, the whole At-rule breaks (the style
            sheet is not imported.)
        <dd>- "@import" statements occurring after other style rules are
            honored (they should be ignored.)
        </dl>
    <li><b class="alert">Netscape</b>
        <dl>
        <dd><b class="alert2">4.x+:</b>
        <dd>- Reported elsewhere: Using @import syntax may crash or hang the
            browser (not reproduceable for me on Win 4.04 and 4.5)
        </dl>
    <li><b class="alert">Opera</b>
        <dl>
        <dd><b class="alert2">3.5+:</b>
        <dd>- The media type can not be specified for @import yet.
        </dl>
</ul>

<br><br>
<a href="../../../misc/copyright.htm">Boring Copyright Stuff....</a>
<br>

</BODY>
</HTML>